<?php
    use \Tuanduimao\Loader\App as App;
?>
<div class="block">
    <div class="block-content tab-content">
            <table class="table table-striped">
            <?php if (is_array($rs) && $total > 0 ) : ?>
                <thead>
                    <tr>
                        <th class="text-center" style="width: 50px;">_ID</th>
                        <th style="width:15%">昵称</th>
                        <th style="width:20%">openid</th>
                        <th style="width:20%">unionid</th>
                        <th style="width:10%">姓名</th>
                        <th style="width:10%">手机号</th>
                        <th class="text-center" style="width:160px;">创建时间</th>
                    </tr>
                </thead>
                <tbody>

                    <?php 
                    foreach ($rs as $hi) : ?>
                    <tr>
                        <td class="text-center"><?=$hi['_id']?></td>
                        <td><?=$hi['nickName']?></td>
                        <td><?=$hi['openid']?></td>
                        <td><?=$hi['unionid']?></td>
                        <td><?=$hi['name']?></td>
                        <td><?=$hi['mobile']?></td>
                  
                        <td class="text-center">
                           <?=$hi['created_at']?>
                        </td>

                    </tr>
                    <?php 
                    endforeach; ?>                    
                </tbody>
            <?php endif; ?>
                <tfoot>
                    <!-- 分页 -->
                    <tr><td colspan="8">
                        <span class="text-primary pull-left  push-20-t"> 共<?=$total?>条 </span>
                        <nav class="pull-right">
                            <ul class="pagination ">
                                
                                <?php foreach ($page as $num) :?>
                                <li class="<?php if ((int)($num)===$cur) {

                                        echo "active task-work-page";
                                           
                                        }?>">
                                    <a href="<?=App::R('defaults', 'index', ['prefix'=>$prefix, 'table'=>$table, 'p'=>$num])?>"><?=$num;?></a>
                                </li>
                                 <?php endforeach; ?>

                            </ul>
                        </nav>
                    </td></tr>
                    <!-- 分页结束 -->
                </tfoot>
            </table>
        </div>
    </div>
</div>